#!/usr/bin/env python 

from PyQt4 import QtGui
from ui import res_rc


class ProfileManager ( object ):
	def __init__ ( self ):
		#self.__profiles = [ Profile ( '127.0.0.1', 'Profilo LocalHost') ]
		self.__profiles = {}

	def get_profiles ( self ):
		return self.__profiles.values ()

	def add_profile ( self, ipaddr, name  = 'no name' ):
		if ipaddr in self.__profiles: return None

		newprofile = Profile ( ipaddr, name )
		self.__profiles [ ipaddr ] = newprofile
		return newprofile


class Profile ( object ):
	def __init__ ( self, ip, name = 'no name' ):
		self.name = name
		self.ip = ip
		self.avatar = QtGui.QPixmap( ':/fiend/avatar' )
		self.secure = False
		self.transfer_mode = 0
		self.uuid = ''

